package cn.hiapi.shopkeeper.entity.order;

import cn.hiapi.basic.entity.BasicEntity;
import cn.hiapi.basic.serializer.LongToStringSerializer;
import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * @author AdinZ
 * @date 2023/1/31 0:42
 */
@Entity
@Table(name = "hiapi_shopkeeper_comment_replay")
@ApiModel(description = "评论回复")
@Getter
@Setter
public class CommentReplay extends BasicEntity {
    @Id
    @GeneratedValue(generator = "snowflake")
    @GenericGenerator(name = "snowflake", strategy = "cn.hiapi.basic.id.SnowflakeId")
    @JSONField(serializeUsing = LongToStringSerializer.class)
    private Long id;


    @ApiModelProperty("所属用户")
    private long uid;

    @ApiModelProperty("回复id")
    private long replayId;

    @ApiModelProperty("阅读状态")
    @Column(name = "_read")
    private int read;

    @ApiModelProperty("回复消息")
    @Column(columnDefinition = "text")
    private String dataJson;

    @ApiModelProperty("创建时间")
    private long created = System.currentTimeMillis();

    @ApiModelProperty("更新时间")
    private long updated = System.currentTimeMillis();


}
